<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新增融资租赁公司信息</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
<div>
    <div>
        <div >
            <form id="formSet1">
                <table class="sq-formTable">
                    <tbody>
                        <tr>
                            <td colspan="2" class="caption"><div class="inR">基本信息
                            </div></td>
                        </tr>
                        <tr>
                            <td style="padding: 0;" colspan="2">
                                <table class="sq-formTable no-border">
                                    <tbody>
                                        <tr>
                                            <td class="tbLabel"><div class="label">隶属</div></td>
                                            <td>
                                                <div class="field">
                                                    <select name="compLvlCd" id="compLvlCd" data-value="">
                                                        <option value="${dfCompLvlCd.key }">${dfCompLvlCd.value }</option>
                                                    </select>
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">中文全称</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="fulNm" id="fulNm" type="text" class="ui-textbox" value="" validate="{required:true}">
                                                </div>
                                                <span class="requiredSymbol">*</span>
                                            </td>
                                            <td class="tbLabel"><div class="label">中文简称</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="shtNm" id="shtNm" type="text" class="ui-textbox" value="" validate="{required:true}">
                                                </div>
                                                <span class="requiredSymbol">*</span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tbLabel"><div class="label">英文名称</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="engNm" id="engNm" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">公司隶属</div></td>
                                            <td>
                                                <div class="field">
                                                    <select name="compPropCd" id="compPropCd" data-value="">
                                                        <option value=" " seleted>请选择</option>
                                                        <c:forEach items="${searchCompPropCdList }" var="kv">
								                        	<option value="${kv.key }">${kv.value }</option>
								                        </c:forEach>
                                                    </select>
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">公司性质</div></td>
                                            <td>
                                                <div class="field">
                                                    <select name="compTypCd" id="compTypCd" data-value="">
                                                        <option value=" " selected="selected">请选择</option>
                                                        <c:forEach items="${searchCompTypCdList }" var="kv">
								                        	<option value="${kv.key }">${kv.value }</option>
								                        </c:forEach>
                                                    </select>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tbLabel"><div class="label">公司规模</div></td>
                                            <td>
                                                <div class="field">
                                                    <select name="empQtyCd" id="empQtyCd" data-value="">
                                                        <option value=" " seleted>请选择</option>
                                                        <c:forEach items="${searchEmpQtyCdList }" var="kv">
								                        	<option value="${kv.key }">${kv.value }</option>
								                        </c:forEach>
                                                    </select>
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">成立日期</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="regDt" id="regDt" type="text" class="ui-datepicker" value=""  disabled="disabled" >
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">营业期限</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="expDt" id="expDt" type="text" class="ui-datepicker" value=""  disabled="disabled" >
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                          <td class="tbLabel"><div class="label">营业执照</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="bizLicNo" id="bizLicNo" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">税务登记证</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="taxRegNo" id="taxRegNo" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">组织机构代码证</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="orgCode" id="orgCode" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tbLabel"><div class="label">经营范围</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="bizScope" id="bizScope" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">注册资本(万元)</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="regCapAmt" id="regCapAmt" type="text" class="ui-textbox" value=""  validate="{number:true}">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">注册电话</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="compTel" id="compTel" type="text" class="ui-textbox" value="" >
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tbLabel"><div class="label">传真</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="compTax" id="compTax" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">注册地址</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="regAddr" id="regAddr" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel"><div class="label">实际办公地址</div></td>
                                            <td>
                                                <div class="field">
                                                    <input name="officeAddr" id="officeAddr" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                       </tr>
				                        <tr>
				                            <td class="tbLabel"><div class="label">备注</div></td>
				                            <td colspan="5">
				                                <div class="field" style="width:100%">
				                                    <textarea name="compRem" id="compRem" rows="4" class="l-textarea" style="width:100%"></textarea>
				                                </div>
				                            </td>
				                         </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="caption"><div class="inR">法人/联系人信息
                            </div></td>
                        </tr>
                        <tr>
                            
                            <td style="padding: 0;">
                                <table class="sq-formTable no-border">
                                    <tbody>
                                        <tr>
                                            <td class="tbLabel noBgColor">法人姓名</td>
                                            <td>
                                                <div class="field">
                                                    <input name="repNm" id="repNm" type="text" class="ui-textbox" value="" validate="{nmcharacter:true}">
                                                </div>
                                            </td>
                                            <td class="tbLabel noBgColor">法人身份证码</td>
                                            <td>
                                                <div class="field">
                                                    <input name="repIdNum" id="repIdNum" type="text" class="ui-textbox" value="" validate="{idcardno:true}">
                                                </div>
                                            </td>
                                            <td class="tbLabel noBgColor">法人办公电话</td>
                                            <td>
                                                <div class="field">
                                                    <input name="repOfficTel" id="repOfficTel" type="text" class="ui-textbox" value="" >
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tbLabel noBgColor">法人常住地址</td>
                                            <td>
                                                <div class="field">
                                                    <input name="repAddr" id="repAddr" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel noBgColor">法人手机号码</td>
                                            <td>
                                                <div class="field">
                                                    <input name="repMp" id="repMp" type="text" class="ui-textbox" value="" validate="{mobile:true}">
                                                </div>
                                            </td>
                                           
                                        </tr>
                                        <tr>
                                            <td class="tbLabel noBgColor">联系人姓名</td>
                                            <td>
                                                <div class="field">
                                                    <input name="lmNm" id="lmNm" type="text" class="ui-textbox" value="" validate="{nmcharacter:true}">
                                                </div>
                                            </td>
                                            <td class="tbLabel noBgColor">联系人身份证码</td>
                                            <td>
                                                <div class="field">
                                                    <input name="lmIdNum" id="lmIdNum" type="text" class="ui-textbox" value="" validate="{idcardno:true}">
                                                </div>
                                            </td>
                                            
                                        </tr>
                                        <tr>
                                            <td class="tbLabel noBgColor">联系人常驻地址</td>
                                            <td>
                                                <div class="field">
                                                    <input name="lmAddr" id="lmAddr" type="text" class="ui-textbox" value="">
                                                </div>
                                            </td>
                                            <td class="tbLabel noBgColor">联系人手机号码</td>
                                            <td>
                                                <div class="field">
                                                    <input name="lmMp" id="lmMp" type="text" class="ui-textbox" value="" validate="{mobile:true}">
                                                </div>
                                            </td>
                                            
                                        </tr>
                                         <tr>
                                            <td colspan="4" align="center">
                                                <div class="btnsBox">
                                                    <span id="saveBtn1" class="sq-button sq-button-hasicon"><i class="sqBtnIco_10"></i>保存</span>
                                                </div>
                                            </td>
                                        </tr>
                                        
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                        
                    </tbody>
                </table>
            </form>
        </div>
    </div>
</div>
</div>


<script type="text/javascript">
$(function(){
	var lastTab = parent.tabItems[0];
	$("#formSet1").ligerForm({
	        validate : true
	    });
    $("#formSet1").ligerForm();
	$("#saveBtn1").click(function(event) {
		var ligerForm = liger.get("formSet1");
        if (!ligerForm.valid()) {
            top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO,SQ_type: "warning"});
            return false; //验证不通过，不执行以下代码
        }
	    var form = new liger.get("formSet1");
	    var data = form.getData();
	    data["regDt"] = $("#regDt").val();
	    data["expDt"] = $("#expDt").val();
	   // alert(JSON.stringify(data));
	   
	    $.ajax({
			type: 'post',
			dataType:'json',
			data:data,
			url: '<%=path%>/system/sysFlCompInfo/add.do',
			success:function(msg){
				 if(msg.success == 1){
					 
					 $.ligerDialog.success(msg.info);
					 var selectedTabId = parent.mainApp.parentTab.selectedTabId;
					 parent.mainApp.parentTab.reload(lastTab.tabid);
					 parent.mainApp.parentTab.removeTabItem(selectedTabId);
					 parent.grid.reload();
				 }else{
					 $.ligerDialog.error(msg.info);
				 }
			}
		});
	});
})

</script>



</body>
</html>
